﻿
#加载路径与存储路径
f_path={
    "db_xls":"C:/Users/eyouh/Desktop/tagid_db.xls",
    #"db_xls":"C:/Users/eyouh/Documents/dept_scada/1.项目管理/BP19001_天津金耀SCADA系统（一期）/1-设计文档/魔法/冻干生产线点表.xls",
    #"db_xls":"C:/Users/eyouh/Documents/dept_scada/1.项目管理/BP19001_天津金耀SCADA系统（一期）/1-设计文档/魔法/冻干仪表类点表.xls",
    "drw_path":"C:/Users/eyouh/Documents/dept_scada/1.项目管理/BP19001_天津金耀SCADA系统（一期）/3-项目工程\天津金耀SCADA/doc/",

    "symlink_cj":"./MyDocs/CJ_CSVS/",
    "symlink_zf":"./MyDocs/ZF_CSVS/",
    "zjq":"./MyDocs/ZJQ_TXTS/",
    "drw_docs":"./MyDocs/DRWS/",
    
}

#需要执行的表格和内容
exc_obj={
    #"funcs":["紫金桥","symlink采集","symlink转发","symlink转发新","紫金桥点"],
    "funcs":["紫金桥"],
    "exec_items":{
        "sheets":["Sheet1"],
        "drws":[]
    },
}








"""
===========================================
以下是数据类型映射和驱动映射,只允许修改值的值
===========================================
"""

#数据类型别名,注意英文的话小写
datatype_parse={
    "布尔":["布尔","bool","二进制变量","boolean"],
    "短整型高":[],
    "短整型低":[],
    "有符号单字":["有符号单字","int","有符号的 16 位值"],
    "无符号单字":["无符号单字","U","无符号的 16 位值","Unsigned short","UNIT"],
    "有符号双字":["有符号双字","dint","long","时间","L","有符号的 32 位值","Long Inverse"],
    "无符号双字":["无符号双字","无符号的 32 位值"],
    "单精度浮点":["单精度浮点","float","F","32-位浮点数 IEEE 754","Float Inverse","SINGLE"],
    "双精度浮点":["双精度浮点"],
    #"字符串/40":["字符串/40","字符串[40]","文本变量"],
    #"时间":["时间","time"]
}

#驱动映射表
driver_parse={
"西门子/s7-200":["西门子/s7-200"],
"西门子/s7-300":["西门子/s7-300"],
#"西门子/s7-400":["西门子/s7-400"], #暂时没有做西门子400的
"西门子/s7-1200":["西门子/s7-1200"],
"三菱/Q系列":["三菱/Q系列"],
"modbus":["modbus","MODBUSRTU","施耐德/TS5NS31"]
}

#支持格式示例,修改并不会对程序进行影响

driver_types={
    "西门子/s7-200":{
        "I寄存器":["I123.4","I132","I13:5"],
        "Q寄存器":["Q123.4","Q132","Q13:5"],
        "M寄存器":["M123.4","M132","M13:5"],
        "V寄存器":["V123.4","V132","V13:5"],
    },
    "西门子/s7-300":{
        "I寄存器":["I123.4","I132","I13:5"],
        "Q寄存器":["Q123.4","Q132","Q13:5"],
        "M寄存器":["M123.4","M132","M13:5"],
        "DB块":["DB[123]43","DB[123]43.3","DB[123]43:3"],
    },
    "西门子/s7-1200":{
        "I寄存器":["I123.4","I132","I13:5"],
        "Q寄存器":["Q123.4","Q132","Q13:5"],
        "M寄存器":["M123.4","M132","M13:5"],
        "DB块":["DB[123]43","DB[123]43.3","DB[123]43:3"],
    },
    "三菱/Q系列":{
            "D寄存器":["D@4100"],
        },
    "modbus":{
        "功能号1":[123],
        "功能号2":[123],
        "功能号3":[123],
        "功能号4":[123],
        "功能号5":[123],
        "功能号6":[123],
        "功能号1,5":[123],
        "功能号3,6":[123]
    }
}

alm_args={
    "Bool":{"状态":0,"延迟":0,"初始值":0,"优先级":3},
    "else":{"状态":0,"延迟":0,"上下限":{"LO":10,"HI":90}}
}